<!-- 成绩单管理详情-->
<template>
    <div class="scorddetail">
        <el-card>
            <el-form ref="form" :disabled="this.$route.params.isEdit == '1' ? true : false" :model="form" label-width="80px" >
                <el-form-item label="学生姓名">
                    <el-input v-model="form.name"  style="width:200px"></el-input>
                </el-form-item>
                <el-form-item label="性别">
                    <el-input v-model="form.sex" :value="form.sex == 0 ? '女' : '男'" style="width:200px"></el-input>
                </el-form-item>
                <el-form-item label="学院">
                    <el-input v-model="form.college" style="width:200px"></el-input>
                </el-form-item>
                <el-form-item label="专业">
                    <el-input v-model="form.major" style="width:200px"></el-input>
                </el-form-item>
                <el-form-item label="班级">
                    <el-input v-model="form.classes" style="width:200px"></el-input>
                </el-form-item>
                <el-form-item label="成绩">
                    <el-table :data="form.achievement" border style="width: 50%">
                        <el-table-column prop="subject" label="科目"> </el-table-column>
                        <el-table-column prop="fraction" label="分数"></el-table-column>
                        <el-table-column label="评分" prop="score"></el-table-column>
                        <el-table-column label="是否补考" prop="makeUp"></el-table-column>
                    </el-table>
                </el-form-item>
            </el-form>
            <el-button class="close" type="info" @click="$router.go(-1)">关闭</el-button>

        </el-card>
    </div>
</template>
<script>
import { getScoreListApi } from "@/api/selfStudy/studentscore.js";
export default {
    data(){
        return{
            form:{}
        }
    },
    mounted(){
        console.log(this.$route.params);
        var id = this.$route.params.id
        getScoreListApi({id:id}).then(res=>{
            console.log(res,'成绩单详情');
            
            this.form = res.rows[0]
            console.log(this.form);
            this.form = res.rows[0]
            this.form.sex = this.form.sex == '0' ? '男' : '女'
        })
    }
}
</script>
<style lang="scss" scoped>
.scorddetail{
    width: 100%;
    padding: 10px;
    .close{
      margin: 0 20px;
    }
}
</style>
